// 测试重构后的代码
import { DSLParser } from './dist/src/dsl/parser.js';

// 简单的YAML测试内容
const testYAML = `
domain: TestDomain
version: 1.0.0
entity:
  name: User
  attributes:
    id:
      type: string
      primary: true
    name:
      type: string
      required: true
    email:
      type: string
      unique: true
`;

try {
  console.log('Testing refactored DSL Parser...');
  const model = DSLParser.parseYAML(testYAML);
  console.log('✅ DSL Parser works correctly');
  console.log('Domain:', model.domain);
  console.log('Entities:', Object.keys(model.entities));
} catch (error) {
  console.error('❌ DSL Parser test failed:', error.message);
}